/*   
 * Project: simple-rpc-load-consistent-hash
 * FileName: ProducerLoadInfo.java
 * Company: Chengdu Sicent Technology Co.,Ltd
 * version: V1.0
 */
package org.simple.rpc.load.hash;

/**
 * 服务器负载策略---一致性hash实体
 * Description:
 * @author: wangbo
 * @date: 2015年10月26日下午2:55:29
 */

public class ProducerLoadInfo extends ShardInfo<String>{

	
	private String producerName;
	private String producerUrl;
	private String version;
	private int weight;
	
	public ProducerLoadInfo(String producerName,String producerUrl,String version,int weight){
		this.producerName=producerName;
		this.producerUrl=producerUrl;
		this.version=version;
		this.weight=weight;
	}
	
	public ProducerLoadInfo(){
		
	}
	
	/* (non-Javadoc)
	 * @see org.simple.rpc.load.hash.ShardInfo#createResource()
	 */
	@Override
	protected String createResource() {
		return this.producerUrl;
	}

	/* (non-Javadoc)
	 * @see org.simple.rpc.load.hash.ShardInfo#getName()
	 */
	@Override
	public String getName() {
		// TODO Auto-generated method stub
		return this.producerUrl;
	}

	public String getProducerName() {
		return producerName;
	}

	public void setProducerName(String producerName) {
		this.producerName = producerName;
	}

	public String getProducerUrl() {
		return producerUrl;
	}

	public void setProducerUrl(String producerUrl) {
		this.producerUrl = producerUrl;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public int getWeight() {
		return weight;
	}

	public void setWeight(int weight) {
		this.weight = weight;
	}

	
}
